import { BasicColumn, FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const todoColumns: BasicColumn[] = [
  // 列定义
  {
    title: '标题', // 系统自动生成
    dataIndex: ['instanceExt', 'autoGenTitle'],
  },
  {
    title: '摘要', // 表单提交的字段
    dataIndex: ['instanceExt', 'f_title'],
  },
  {
    title: '节点名称',
    dataIndex: 'displayName',
  },
  {
    title: '发起人',
    dataIndex: ['instanceExt', 'u_realName'],
  },
  {
    title: '发起时间',
    dataIndex: 'instanceCreateTime',
  },
  {
    title: '发起人所属部门',
    dataIndex: ['instanceExt', 'u_deptName'],
  },
  {
    title: '发起人职务',
    dataIndex: ['instanceExt', 'u_postName'],
  },
];

export const todoSearchFormSchema: FormSchema[] = [
  {
    field: 'm_t_LIKE_displayName',
    label: '节点名称',
    component: 'Input',
    colProps: {
      xl: 6,
      xxl: 6,
    },
    componentProps: {
      placeholder: '请输入节点名称',
    },
  },
];

export const doneColumns: BasicColumn[] = [
  // 列定义
  {
    title: '标题', // 系统自动生成
    dataIndex: ['instanceExt', 'autoGenTitle'],
  },
  {
    title: '摘要', // 表单提交的字段
    dataIndex: ['instanceExt', 'f_title'],
  },
  {
    title: '节点名称',
    dataIndex: 'displayName',
  },
  {
    title: '发起人',
    dataIndex: ['instanceExt', 'u_realName'],
  },
  {
    title: '发起时间',
    dataIndex: 'instanceCreateTime',
  },
  {
    title: '完成时间',
    dataIndex: 'finishTime',
  },
  {
    title: '发起人所属部门',
    dataIndex: ['instanceExt', 'u_deptName'],
  },
  {
    title: '发起人职务',
    dataIndex: ['instanceExt', 'u_postName'],
  },
];

export const doneSearchFormSchema: FormSchema[] = [
  {
    field: 'm_t_LIKE_displayName',
    label: '节点名称',
    component: 'Input',
    colProps: {
      xl: 6,
      xxl: 6,
    },
    componentProps: {
      placeholder: '请输入节点名称',
    },
  },
];
